package com.fzg.service;

import com.fzg.common.enums.ResponseWrapper;
import com.fzg.common.model.param.chat.EditChatNickName;
import com.fzg.common.model.param.chat.SendMessageParam;
import com.fzg.entity.Chat;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author fzg
 * @since 2022-07-12
 */
public interface ChatService extends IService<Chat> {


    /**
     * 根据对方用户的aid查询当前登陆的用户和对方用户的聊天信息
     * @param userAid 用户的aid
     * @return ResponseWrapper
     */
    ResponseWrapper queryChatRecordInfo(HttpServletRequest request, Integer userAid);

    /**
     * 通过用户aid修改聊天记录页面里面的对方用户昵称
     * @param param 参数
     * @return ResponseWrapper
     */
    ResponseWrapper editChatUserNickName(HttpServletRequest request, EditChatNickName param);


    /**
     * 发送给对方消息
     * @param param 参数
     * @return ResponseWrapper
     */
    ResponseWrapper sendMessageToChatObject(HttpServletRequest request, SendMessageParam param);

}
